/**
 * Created by lvlq on 16/7/31.
 */
var Sequelize = require("sequelize");
var sequelize = Util("sequelize");

module.exports = sequelize.define("record", {
    activityId: {
        type: Sequelize.INTEGER,
        field: "activityId",
        allowNull: false,
        defaultValue: 0
    },
    participantId: {
        type: Sequelize.INTEGER,
        field: "participantId",
        allowNull: false,
        defaultValue: 0
    },
    points: {
        type: Sequelize.INTEGER,
        field: "points",
        allowNull: false,
        defaultValue: 0
    },
    images: {
        type: Sequelize.TEXT,
        field: "images",
        allowNull: false,
        defaultValue: ""
    },
    videos: {
        type: Sequelize.TEXT,
        field: "videos",
        allowNull: false,
        defaultValue: ""
    }

}, {
    comment: "队列表",
    indexes: [
        {
            fields: ["activityId", 'participantId']
        }
    ]
});